|
In web development, the CSS box model refers to the composition of a webpage or HTML page from blocks or boxes using CSS. Specifically, the box model describes how the size of each such block and its content is determined through styling instructions. The guidelines of the box model are described by the World Wide Web Consortium (W3C). ==Specifics== The content of each box is detemined by 4 parameters: : *the height/width describes the dimensions of the actual content of the box (text, images, ...) : *the padding describes the space between this content and the border of the box : *the border is any kind of line (solid, dotted, dashed...) surrounding the box, if present : *the margin is the space around the border The total width of a box is therefore the width of the content, plus (left- and right-) padding, plus (left- and right-) border, plus (left- and right-) margin. Similarly, the total height of a box equals the height of the content, plus (top- and bottom-) padding, plus (top- and bottom-) border, plus (top- and bottom-) margin. For example, the following CSS code
will specify the box dimensions of each block belonging to 'myClass'. Moreover, each such box will have total height 160px and width 260px, which is the sum of the content, padding, border and margin. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「CSS box model」の詳細全文を読む スポンサード リンク
|